package com.njbw.minio.entity;

import java.util.Map;

public class CreateMultipartUploadResult {

    /**
     * 上传 id
     */
    private String uploadId;

    /**
     * 分片地址
     */
    private Map<String, Object> chunks;

    public CreateMultipartUploadResult() {
    }

    public CreateMultipartUploadResult(Builder builder) {
        this.uploadId = builder.uploadId;
        this.chunks = builder.chunks;
    }

    public String getUploadId() {
        return uploadId;
    }

    public void setUploadId(String uploadId) {
        this.uploadId = uploadId;
    }

    public Map<String, Object> getChunks() {
        return chunks;
    }

    public void setChunks(Map<String, Object> chunks) {
        this.chunks = chunks;
    }

    public static class Builder {

        private String uploadId;

        private Map<String, Object> chunks;

        public Builder uploadId(String uploadId) {
            this.uploadId = uploadId;
            return this;
        }

        public Builder chunks(Map<String, Object> chunks) {
            this.chunks = chunks;
            return this;
        }

        public CreateMultipartUploadResult build() {
            return new CreateMultipartUploadResult(this);
        }
    }
}
